home *** CD-ROM | disk | FTP | other *** search
- Path: news.uh.edu!usenet
- From: Sensarn <txs53132@bayou.uh.edu>
- Newsgroups: comp.lang.c++
- Subject: Re: Help:Memory allocation above 64kbytes
- Date: 15 Jan 1996 14:59:42 GMT
- Organization: AEtna Insurance Agency
- Message-ID: <4ddq4u$9pv@masala.cc.uh.edu>
- References: <30FA67A9.31CC@mj.org.za>
- NNTP-Posting-Host: sip-14271.public-dialups.uh.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1 (Windows; U; 16bit)
-
- Wayne Cawood <wcawood@mj.org.za> wrote:
- >Dear Intellectual!
- >
- >I am in desperate need of advice on how to combat the problem of
- >addressing memory above 64000 bytes. Nothing I do works. I know the
- >borland c++ 3.1 compiler should be able to but I am completely confused
- >as to why my computer (and others which I have tried on), bomb OUT when
- >I attempt to write to this memory.
- >
- >Here's some code to illustrate the problem.
- >
- >#inlcude <etc> // If there are any special header files please mention
- >them
- >
- >typedef char buffer[64000];
- >
- >void main()
- >{
- >char far *BUF;
- >
- >BUF = (char far *)new buffer;
- >
- >}
- >
- Use farmalloc (includes malloc.h). Make sure you go into the
- OPTIONS/DEBUGGER menu and change the PROGRAM HEAP SIZE from 64k to
- something larger (like 640k).
-
- >This allocates the memory, but when I try to write to memory, my system
- >shuts down. Please Help! ANYBODY!!!!
- >How do I address the EMS,XMS or what ever MS I am supposed to use!
- >I have 8megs of extended memory and I can't use it!! How frustrating!!
- >
- >Thanks in advance!
- >Craig Haworth (Games programmer in training)
-
-
-